package com.csweimei.rentmanagementtreasure.http.entity;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class HouseDetailHzBean extends BaseResult{
    @SerializedName("data")
    private DataDTO data;

    public DataDTO getData() {
        return data;
    }

    public void setData(DataDTO data) {
        this.data = data;
    }

    public static class DataDTO {
        @SerializedName("hlist")
        private HlistDTO hlist;
        @SerializedName("roomlist")
        private List<RoomlistDTO> roomlist;
        @SerializedName("details")
        private List<DetailsDTO> details;

        public HlistDTO getHlist() {
            return hlist;
        }

        public void setHlist(HlistDTO hlist) {
            this.hlist = hlist;
        }

        public List<RoomlistDTO> getRoomlist() {
            return roomlist;
        }

        public void setRoomlist(List<RoomlistDTO> roomlist) {
            this.roomlist = roomlist;
        }

        public List<DetailsDTO> getDetails() {
            return details;
        }

        public void setDetails(List<DetailsDTO> details) {
            this.details = details;
        }

        public static class HlistDTO {
            @SerializedName("id")
            private int id;
            @SerializedName("userid")
            private int userid;
            @SerializedName("city")
            private String city;
            @SerializedName("category")
            private String category;
            @SerializedName("quarters")
            private String quarters;
            @SerializedName("roomname")
            private String roomname;
            @SerializedName("houserType")
            private String houserType;
            @SerializedName("Payment")
            private String payment;
            @SerializedName("rent")
            private String rent;
            @SerializedName("Address")
            private String address;
            @SerializedName("totalArea")
            private String totalArea;
            @SerializedName("imgsrc")
            private String imgsrc;
            @SerializedName("floor")
            private String floor;
            @SerializedName("lift")
            private String lift;
            @SerializedName("renovation")
            private String renovation;
            @SerializedName("toward")
            private String toward;
            @SerializedName("facilities")
            private String facilities;
            @SerializedName("describe")
            private String describe;
            @SerializedName("roomfeatures")
            private String roomfeatures;
            @SerializedName("housingTitle")
            private String housingTitle;
            @SerializedName("illustrate")
            private String illustrate;
            @SerializedName("status")
            private int status;
            @SerializedName("addtime")
            private String addtime;
            @SerializedName("longitude")
            private String longitude;
            @SerializedName("latitude")
            private String latitude;

            public String getTitle(){
                return quarters+roomname;
            }

            public String getTitle1(){
                return quarters+roomname+"-"+totalArea+"㎡";
            }

            public String getUrl(){
                if (ValidateUtils.isNotEmptyString(imgsrc)){
                    if (imgsrc.contains(",")){
                        String[] strings = imgsrc.split(",");
                        return strings[0];
                    }
                }
                return "";
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getUserid() {
                return userid;
            }

            public void setUserid(int userid) {
                this.userid = userid;
            }

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getCategory() {
                return category;
            }

            public void setCategory(String category) {
                this.category = category;
            }

            public String getQuarters() {
                return quarters;
            }

            public void setQuarters(String quarters) {
                this.quarters = quarters;
            }

            public String getRoomname() {
                return roomname;
            }

            public void setRoomname(String roomname) {
                this.roomname = roomname;
            }

            public String getHouserType() {
                return houserType;
            }

            public void setHouserType(String houserType) {
                this.houserType = houserType;
            }

            public String getPayment() {
                return payment;
            }

            public void setPayment(String payment) {
                this.payment = payment;
            }

            public String getRent() {
                return rent;
            }

            public void setRent(String rent) {
                this.rent = rent;
            }

            public String getAddress() {
                return address;
            }

            public void setAddress(String address) {
                this.address = address;
            }

            public String getTotalArea() {
                return totalArea;
            }

            public void setTotalArea(String totalArea) {
                this.totalArea = totalArea;
            }

            public String getImgsrc() {
                return imgsrc;
            }

            public void setImgsrc(String imgsrc) {
                this.imgsrc = imgsrc;
            }

            public String getFloor() {
                return floor;
            }

            public void setFloor(String floor) {
                this.floor = floor;
            }

            public String getLift() {
                return lift;
            }

            public void setLift(String lift) {
                this.lift = lift;
            }

            public String getRenovation() {
                return renovation;
            }

            public void setRenovation(String renovation) {
                this.renovation = renovation;
            }

            public String getToward() {
                return toward;
            }

            public void setToward(String toward) {
                this.toward = toward;
            }

            public String getFacilities() {
                return facilities;
            }

            public void setFacilities(String facilities) {
                this.facilities = facilities;
            }

            public String getDescribe() {
                return describe;
            }

            public void setDescribe(String describe) {
                this.describe = describe;
            }

            public String getRoomfeatures() {
                return roomfeatures;
            }

            public void setRoomfeatures(String roomfeatures) {
                this.roomfeatures = roomfeatures;
            }

            public String getHousingTitle() {
                return housingTitle;
            }

            public void setHousingTitle(String housingTitle) {
                this.housingTitle = housingTitle;
            }

            public String getIllustrate() {
                return illustrate;
            }

            public void setIllustrate(String illustrate) {
                this.illustrate = illustrate;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getAddtime() {
                return addtime;
            }

            public void setAddtime(String addtime) {
                this.addtime = addtime;
            }

            public String getLongitude() {
                return longitude;
            }

            public void setLongitude(String longitude) {
                this.longitude = longitude;
            }

            public String getLatitude() {
                return latitude;
            }

            public void setLatitude(String latitude) {
                this.latitude = latitude;
            }
        }

        public static class RoomlistDTO {
            @SerializedName("id")
            private int id;
            @SerializedName("housingID")
            private int housingID;
            @SerializedName("Room")
            private String room;
            @SerializedName("Rent")
            private String rent;
            @SerializedName("status")
            private int status;
            @SerializedName("addtime")
            private String addtime;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getHousingID() {
                return housingID;
            }

            public void setHousingID(int housingID) {
                this.housingID = housingID;
            }

            public String getRoom() {
                return room;
            }

            public void setRoom(String room) {
                this.room = room;
            }

            public String getRent() {
                return rent;
            }

            public void setRent(String rent) {
                this.rent = rent;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getAddtime() {
                return addtime;
            }

            public void setAddtime(String addtime) {
                this.addtime = addtime;
            }
        }

        public static class DetailsDTO {
            @SerializedName("leaseid")
            private int leaseid;
            @SerializedName("rid")
            private int rid;
            @SerializedName("uname")
            private String uname;
            @SerializedName("rent")
            private String rent;
            @SerializedName("paytype")
            private String paytype;
            @SerializedName("roomname")
            private String roomname;
            @SerializedName("phone")
            private String phone;
            @SerializedName("deposit")
            private String deposit;
            @SerializedName("staeTime")
            private String staeTime;
            @SerializedName("endTime")
            private String endTime;

            public int getLeaseid() {
                return leaseid;
            }

            public void setLeaseid(int leaseid) {
                this.leaseid = leaseid;
            }

            public int getRid() {
                return rid;
            }

            public void setRid(int rid) {
                this.rid = rid;
            }

            public String getUname() {
                return uname;
            }

            public void setUname(String uname) {
                this.uname = uname;
            }

            public String getRent() {
                return rent+"元/月";
            }

            public void setRent(String rent) {
                this.rent = rent;
            }

            public String getPaytype() {
                return paytype;
            }

            public void setPaytype(String paytype) {
                this.paytype = paytype;
            }

            public String getRoomname() {
                return roomname;
            }

            public void setRoomname(String roomname) {
                this.roomname = roomname;
            }

            public String getPhone() {
                return phone;
            }

            public void setPhone(String phone) {
                this.phone = phone;
            }

            public String getDeposit() {
                return deposit+"元";
            }

            public void setDeposit(String deposit) {
                this.deposit = deposit;
            }

            public String getStaeTime() {
                return staeTime;
            }

            public void setStaeTime(String staeTime) {
                this.staeTime = staeTime;
            }

            public String getEndTime() {
                return endTime;
            }

            public void setEndTime(String endTime) {
                this.endTime = endTime;
            }

            public String getTime() {
                return ValidateUtils.getTimeFormYMD(staeTime)+"至"+ValidateUtils.getTimeFormYMD(endTime);
            }
        }
    }
}
